package java0709Exception;

import java.util.Scanner;

public class Test02 {

	public static void main(String[] args) throws ByteSizeException {
		
		Scanner sc = new Scanner(System.in);
		try {
		System.out.println("请输入一个整数");
		int i = sc.nextInt();
		if(i<-128||i>127) {
			throw new ByteSizeException();
		}
		}catch(ByteSizeException e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
		
		
	}
	
	
}
